---
title: Load provider ineligibility periods
summary: Loads ineligibility windows for a provider location, or a single ineligibility period by ID.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-21
library: SAIF.Business.View.Provider
reference_type: embedded
operation_id: OP-06
trigger: clsProviderLocation.IneligibilityPeriods
---

# Load provider ineligibility periods

Loads the ineligibility windows associated with a provider location (or a single window by ID), used by `clsProviderLocation.IsDuringIneligibilityPeriod` to determine location eligibility on a given date.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-06 |
| **Trigger** | `clsProviderLocation.IneligibilityPeriods` |
| **Inputs** | `IDataPortalInfo`, provider-location ID or ineligibility-period ID |
| **Outputs** | `clsProviderIneligibilityPeriodCollection`, `clsProviderIneligibilityPeriod` |
| **Primary components** | `clsProviderIneligibilityPeriodCollection.GetProviderIneligibilityPeriodCollection`, `clsProviderIneligibilityPeriod.GetProviderIneligibilityPeriod` |
| **Entry point** | `SAIF.Business.View.Provider/clsProviderIneligibilityPeriodCollection.vb:216`; `SAIF.Business.View.Provider/clsProviderIneligibilityPeriod.vb:311` |

## Steps

1. `BeforeRetrieve` binds `:ProviderLocationID` (collection retrieval, [SQL-PINE-02](../sql/SQL-PINE-02-ineligibility-periods-by-location.md)) or `:IneligibilityPeriodID` (single retrieval, [SQL-PINE-01](../sql/SQL-PINE-01-ineligibility-period-by-id.md)) against [PROVIDER_INELIG_PERIOD](../database-tables.md#provider_inelig_period).
2. `AfterRetrieve` fills the object(s) from the reader and calls `MarkOld()`.
3. `TerminationDate` returns `Date.MaxValue` when the underlying column is empty ([BR-PINE-001](../business-rules.md#br-pine-001-ineligibility-periods-without-termination-default-to-date-maxvalue)).
4. `clsProviderLocation.IsDuringIneligibilityPeriod(date)` counts windows containing the date, enforcing [BR-PLOC-004](../business-rules.md#br-ploc-004-ineligible-locations-are-excluded-from-filtered-lists).
   - Note: no navigation-property backing field caches the collection — every access to `IneligibilityPeriods` re-queries the table.*

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Caller request]) --> S1{Single period or collection?}
	S1 -->|Single| S2[Bind IneligibilityPeriodID]
	S1 -->|Collection| S3[Bind ProviderLocationID]
	S2 --> S4[AfterRetrieve: Fill, MarkOld]
	S3 --> S4
	S4 --> S5[TerminationDate = Date.MaxValue<br>when empty]
	S5 --> S6{"IsDuringIneligibilityPeriod<br>date?"}
	S6 -->|Yes| S7(["Location treated as<br>ineligible"])
	S6 -->|No| EndOk([Location treated as eligible])
```

## Failure and edge-case behavior

- No matching windows: an empty collection is returned; the location is treated as eligible for any date.
- Every access to `clsProviderLocation.IneligibilityPeriods` re-queries the database (no caching), unlike other navigation properties.*
- An open-ended ineligibility period (no termination date) is treated as never expiring ([BR-PINE-001](../business-rules.md#br-pine-001-ineligibility-periods-without-termination-default-to-date-maxvalue)).

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Business.View.Provider/clsProviderIneligibilityPeriod.vb`
- `SAIF.Business.View.Provider/clsProviderIneligibilityPeriodCollection.vb`
- `SAIF.Business.View.Provider/clsProviderLocation.vb`
